package com.ipworkbench.common.util;

import org.apache.log4j.Logger;

import com.ipworkbench.common.db.TransactionManager;

/**
 * 业务层基类
 * 
 * @author zhangfaheng
 *
 * @date Oct 27, 2009
 */
public class BaseManager {
	
	protected final Logger logger = Logger.getLogger(this.getClass());
	
	   public void beginTransaction() throws IPWException {
		   TransactionManager.beginTransaction();
	    }

	    public void commit() throws IPWException{
	    	TransactionManager.commitAndClose();
	    }

	    public void rollback() throws IPWException{
	    	TransactionManager.rollbackAndClose();
	    }
	    public void endTransaction() throws IPWException{
	    	TransactionManager.endTransaction();
	    }

}
